home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / COMPTOOL / ACTVCOMP / COFFEE / CWNOTME.CLS < prev    next >
Encoding:
Visual Basic class definition  |  1996-11-27  |  1.3 KB  |  47 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "NotifyMe"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = False
  8. Attribute VB_PredeclaredId = False
  9. Attribute VB_Exposed = True
  10. Option Explicit
  11.  
  12. ' NotifyMe implements ICoffeeNotify so that
  13. '   its call-back method (CoffeeReady) can
  14. '   be called early-bound.
  15. Implements ICoffeeNotify
  16.  
  17. ' Storage for implementation of NotifyID.
  18. Private mlngNotifyID As Long
  19.  
  20. ' ICoffeeNotify.CoffeeReady is called by the
  21. ' ============= -----------     CoffeeMonitor2
  22. '   object in Coffee2.  This implementation
  23. '   adds the time of the call to a list box,
  24. '   and deletes the oldest entry if there are
  25. '   more than ten entries.
  26. '
  27. Private Sub ICoffeeNotify_CoffeeReady()
  28.     With Form1.lstCallBacks
  29.         .AddItem Format$(Now, "ddd hh:mm:ss"), 0
  30.         If .ListCount > 10 Then .RemoveItem 10
  31.     End With
  32. End Sub
  33.  
  34. ' ICoffeeNotify.NotifyID property holds the
  35. ' ============= --------       notification
  36. '   object's key in CoffeeMonitor2's array
  37. '   of client objects.  Client implementation
  38. '   simply stores and returns the value.
  39. '
  40. Private Property Let ICoffeeNotify_NotifyID(ByVal RHS As Long)
  41.     mlngNotifyID = RHS
  42. End Property
  43. '
  44. Private Property Get ICoffeeNotify_NotifyID() As Long
  45.     ICoffeeNotify_NotifyID = mlngNotifyID
  46. End Property
  47.